package com.ruicar.afs.cloud.basic.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.basic.api.corporate.dto.BasicPenaltyExemptDto;
import com.ruicar.afs.cloud.basic.common.entity.BasicExpenseRecord;
import com.ruicar.afs.cloud.basic.common.entity.BasicReceiptDealDetails;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import org.springframework.web.bind.annotation.RequestBody;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author: Lee
 * @date 2020-05-30 04:34:35 
 * @description 
 */
public interface BasicExpenseRecordService extends IService<BasicExpenseRecord> {

    /**
     * 费用记录核销相关处理
     * @author ZC.GUO
     * @param expenseRecord 费用记录
     * @param amount 核销金额
     * @return
     */
    public void handleExpenseRecord(BasicReceiptDealDetails receiptDealDetails,BasicExpenseRecord expenseRecord, BigDecimal amount,Long receiptId);
    /**
     * 撤销费用核销
     * @author ZC.GUO
     * @param receiptDealDetails 费用记录
     * @return
     */
    public void cancelExpenseRecord(BasicReceiptDealDetails receiptDealDetails);


    public IResponse updatePenaltyInterest(@RequestBody BasicPenaltyExemptDto condition, Date batchDate);


    /**
     * 罚息收款撤销
     * @author ZC.GUO
     * @param expenseRecord 费用总记录
     * @param dealAmt 撤销金额
     * @return
     */
    public void cancelPenalty(Long receiptDetailId,BasicExpenseRecord expenseRecord, BigDecimal dealAmt);
    /**
     * 其他费用类型收款撤销
     * @author ZC.GUO
     * @param expenseRecord 费用总记录
     * @param dealAmt 撤销金额
     * @return
     */
    public void cancelOthers(Long receiptDetailId,BasicExpenseRecord expenseRecord, BigDecimal dealAmt);

}
